package com.tj.bigdata.syncblock.utils;

import com.tj.bigdata.syncblock.constant.ShareKey;
import tk.mybatis.mapper.genid.GenId;

/**
 *  通过雪花算法获取一个64bit数字 用于mybatis 生成值
 *
 * @author guoch
 */
public class IDGen implements GenId<Long> {
    @Override
    public Long genId(String table, String column) {
        return ShareKey.snowflake.nextId();
    }
}
